//q1c.cpp
//This program takes a two numbers and print a table accordingly
//
//Binyamin 28 december 2017
//===========================================================================
#include<iostream>

using namespace std;

//1. Prompt for two numbers.
//2. Capture two numbers.
//3. print the table.

int main()
{
	int k,n; //k - a number entered by the user.
		 //n - a number entered by the user.
	int t,i,j; //t,i,j - looper to use in the forloop. 
	cout << "Please enter two numbers: ";
	cin >> k >> n;
	for(t=0;t<n;t++)
	{
		for(i=0;i<=k;i++)
		{
			for(j=0;j<n;j++)
				cout << (t+j)%n;
			cout << '@';
		}
		cout << endl;
	}
	return 0;
}
//output
//Please enter two numbers: 3 5
//01234@01234@01234@01234@
//12340@12340@12340@12340@
//23401@23401@23401@23401@
//34012@34012@34012@34012@
//40123@40123@40123@40123@
